package com.unitd.base.module.api.service;

import com.unitd.base.module.api.mybatis.mapper.ApiKeywordsMapper;
import com.unitd.base.module.api.entity.KeywordsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service
public class ApiKeywordsService {
    @Autowired
    private ApiKeywordsMapper keywordsDao;


    public KeywordsVo queryObject(Integer id) {
        return keywordsDao.selectById(id);
    }


    public List<KeywordsVo> queryList(Map<String, Object> map) {
        return keywordsDao.selectByMap(map);
    }


    public int queryTotal(Map<String, Object> map) {
        return keywordsDao.queryTotal(map);
    }


    public void save(KeywordsVo goods) {
        keywordsDao.insert(goods);
    }


    public void update(KeywordsVo goods) {
        keywordsDao.updateById(goods);
    }

    public void delete(Integer id) {
        keywordsDao.deleteById(id);
    }

    public List<Map> hotKeywordList(Map<String, Object> map) {
        return keywordsDao.hotKeywordList(map);
    }
}
